if (me._searchEntry.entry.text != '')
me._searchEntry.entry.text = '';
// Next, if we're in one of the "more" modes or showing the details pane, close them
- else if (me._moreAppsMode || me._moreDocsMode || me._detailsShowing())
+ else if (me._resultsShowing())
me.unsetMoreMode();
// Finally, just close the overlay entirely
else
this._moreAppsLink.setText("More...");
- this._repositionDetails();
- if (!this._detailsShowing()) {
- this.emit('panes-removed');
- }
+ this._hideDetails();
},
// Sets the 'More' mode for browsing documents.
this._moreDocsLink.setText("More...");
- this._repositionDetails();
-
- if (!this._detailsShowing()) {
- this.emit('panes-removed');
- }
+ this._hideDetails();
},
_setSearchMode: function() {
this._resultsDocsSection._unsetSearchMode();
this._resultsDocsSection.actor.set_y(0);
- this._repositionDetails();
-
- if (!this._detailsShowing()) {
- this.emit('panes-removed');
- }
+ this._hideDetails();
},
_repositionDetails: function () {
this.emit('panes-displayed');
},
+ _hideDetails: function() {
+ if (!this._detailsShowing)
+ return;
+ this._detailsPane.hide();
+ this.emit('panes-removed');
+ },
+
_detailsShowing: function() {
return this._detailsPane.visible;
},